package com.example.a2306_shop.adapter

import android.widget.CheckBox
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.a2306_shop.R
import com.example.lib_base.entity.Address

class AddressAdapter :BaseQuickAdapter<Address,BaseViewHolder>(R.layout.item_address){
    override fun convert(holder: BaseViewHolder, item: Address) {
        holder.setText(R.id.address_user,"收货人:${item.realName}   ${item.phone}")
        holder.setText(R.id.address_address,"收货地址:${item.province}${item.city}${item.district}${item.detail}")
        holder.getView<CheckBox>(R.id.address_cb).isChecked = item.isDefault
    }
}